﻿<div>
    <p>Please click one of the buttons below to close or cancel the modal.</p>

    <button @onclick="Close" class="btn btn-primary">Close</button>
    <button @onclick="Cancel" class="btn btn-secondary">Cancel</button>
</div>

@code {

    [CascadingParameter] BlazoredModalInstance BlazoredModal { get; set; }

    async Task Close() =>  await BlazoredModal.CloseAsync(ModalResult.Ok(true));
    async Task Cancel() => await BlazoredModal.CancelAsync();

}
